import request from '@/utils/request'
// #region 线体定义
// 获取线体清单
export function getOrderList(query) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1500, para: query }
  })
}
// 创建一条线体
export function creatOrder(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1501, para: val }
  })
}
// 更新一个订单
export function updateOrder(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1502, para: val }
  })
}
// 删除一个订单
export function deleteOrder(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1503, para: val }
  })
}
export function getOrderHistory(query) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1510, para: query }
  })
}
// #endregion

// 保存订单
export function saveOrder(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1504, para: val }
  })
}

// 获取待生产产品清单
export function getPendingOrderList(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1520, para: val }
  })
}

// 创建待生产产品清单
export function creatPendingOrderList(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1521, para: val }
  })
}

// 更新待生产产品清单
export function updatePendingOrderList(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1522, para: val }
  })
}

// 删除待生产产品清单
export function deletePendingOrderList(val) {
  return request({
    url: '/web/order',
    method: 'post',
    data: { eventId: 1523, para: val }
  })
}
// 从服务器下载数据
export function downloadOrderFromMes(val) {
  return request({
    url: '/web/rmes',
    method: 'post',
    data: { eventId: 1600, para: val }
  })
}
